package mf.com.Service.impl.Product;

import com.github.pagehelper.PageHelper;
import com.github.pagehelper.PageInfo;
import jakarta.annotation.Resource;
import mf.com.Service.Product.ProductService;
import mf.com.dto.product.ProductDto;
import mf.com.entity.product.Product;
import mf.com.mapper.product.ProductMapper;
import mf.com.vo.common.Result;
import org.springframework.stereotype.Service;

/**
 * @Author: lmf
 * @Create: 2024/4/10 21:35
 * Description:  商品服务实现层
 */
@Service
public class ProductServiceImpl implements ProductService {
    @Resource
    private ProductMapper productMapper;
    @Override
    public PageInfo<Product> findByPage(ProductDto productDto, Integer pageNum, Integer pageSize) {
        PageHelper.startPage(pageNum,pageSize);
        return new PageInfo<Product>(productMapper.findByPage(productDto));
    }
}
